import request from '@/utils/request'

// 所有项目列表
export function allProject (query) {
  return request({
    url: '/projectManage/project/all',
    method: 'get',
    params: query
  })
}

// 查询项目列表
export function listProject (query) {
  return request({
    url: '/projectManage/project/list',
    method: 'get',
    params: query
  })
}

// 查询项目详细
export function getProject (id) {
  return request({
    url: '/projectManage/project/' + id,
    method: 'get'
  })
}

// 新增项目
export function addProject (data) {
  return request({
    url: '/projectManage/project',
    method: 'post',
    data: data
  })
}

// 修改项目
export function updateProject (data) {
  return request({
    url: '/projectManage/project',
    method: 'put',
    data: data
  })
}

// 删除项目
export function delProject (id) {
  return request({
    url: '/projectManage/project/' + id,
    method: 'delete'
  })
}

// 资源审批
export function approveResource (data) {
  return request({
    url: '/projectManage/project/approveResource',
    method: 'post',
    data: data
  })
}

// 项目审批
export function approveProject (data) {
  return request({
    url: '/projectManage/project/approveProject',
    method: 'post',
    data: data
  })
}